package com.bgi.uims.pub.sms;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;

public class SmsTestA {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String info = null;
		try{
			HttpClient httpclient = new HttpClient();
			PostMethod post = new PostMethod("http://guangdong.ums86.com:8899/sms/Api/Send.do");//
			post.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"gbk");
			post.addParameter("SpCode", "003356");
			post.addParameter("LoginName", "admin");
			post.addParameter("Password", "888888");
			post.addParameter("MessageContent", "亲爱的樊清华女士，您好，无创产前基因检测结果显示：胎儿21三体为低风险，详情见正式检测报告。纸质版检测报告将尽快送达医院，为避免时间过早无法领取到报告，请您按照检测时通知的时间和地点，在收到短信3-5天后至检测医院领取纸质版报告(如遇法定节假日假期将顺延)。如需更多了解，请联系400-605-6655。祝您阖家幸福！");
			post.addParameter("UserNumber", "13417431075");
			post.addParameter("SerialNumber", "21110801142517000012");
			post.addParameter("ScheduleTime", "");
			post.addParameter("f", "1");
			
			httpclient.executeMethod(post);
			info = new String(post.getResponseBody(),"gbk");
			System.out.println("print:"+info);

		}catch (Exception e) {
			e.printStackTrace();
		}
	}

}